<?php
class Validation{
	
	function IsValidUsername($username)
	{
		if(!preg_match("/^[A-Za-z0-9ÖÄÅöäå]+$/", $username))
	   	{
	    	return false;
	   	}
	   	else
	   	{
	       	return true;
	   	}
	}

	function IsValidPassword($password)
	{
		if(preg_match("/^[A-Za-z0-9ÖÄÅöäå]+$/", $password))
   	 	{
        	return true;
   	 	}
   	 	else
   	 	{
			return false;
   	 	}
	}

	function IsValidEmail($email)
	{
		if(preg_match('/^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)+$/',$email))
   	 	{
        	return true;
   	 	}
   	 	else
   	 	{
			return false;
   	 	}
	}

}